package com.fyi.service.impl;

import com.fyi.entity.Comment;
import com.fyi.mapper.CommentMapper;
import com.fyi.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    private CommentMapper commentMapper;
    @Override
    public List<Comment> selectAllComment() {
        return commentMapper.selectAllComment();
    }

    @Override
    public Comment selectCommentById(Integer id) {
        return commentMapper.selectCommentById(id);
    }

    @Override
    public Integer addComment(Comment comment) {
        return commentMapper.addComment(comment);
    }

    @Override
    public Integer updateComment(Comment comment) {
        return commentMapper.updateComment(comment);
    }

    @Override
    public Integer deleteComment(Integer id) {
        return commentMapper.deleteComment(id);
    }
}
